﻿<script type="text/javascript" language="javascript">
	$(function () {
		$.getJSON('@Url.Action("Archives", "Home")', function (data) {
			var items = [];

			$.each(data, function (key, val) {
				items.push("<a href='/Post/Posts/" + val.Date + "'>" + val.Date + ' ( ' + val.PostCount + ' )</a><br/> ');
			});

			$('<ul/>', {
				'class': 'my-new-list',
				html: items.join('')
			}).appendTo('#archives');
		});
	});
</script>
<h2>
	Archives</h2>
<div id="archives">
</div>
